home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Online / OpenURL / Developer / Source / prefs_common.h < prev    next >
C/C++ Source or Header  |  1999-09-26  |  4KB  |  124 lines

  1. /*
  2. ** OpenURL - MUI preferences for openurl.library
  3. ** Written by Troels Walsted Hansen <troels@thule.no>
  4. ** Placed in the public domain.
  5. **
  6. ** Includes header files required for all modules and defines some common
  7. ** macros and definitions.  Also Includes prototypes for functions in
  8. ** prefs_common.c.
  9. */
  10.  
  11. #define __USE_SYSBASE
  12. #include <proto/exec.h>
  13. #include <proto/dos.h>
  14.  
  15. #include <clib/muimaster_protos.h>
  16. #include <clib/intuition_protos.h>
  17. #include <clib/utility_protos.h>
  18. #include <clib/icon_protos.h>
  19. #include <clib/openurl_protos.h>
  20.  
  21. #include <pragmas/muimaster_pragmas.h>
  22. #include <pragmas/intuition_pragmas.h>
  23. #include <pragmas/utility_pragmas.h>
  24. #include <pragmas/icon_pragmas.h>
  25. #include <pragmas/openurl_pragmas.h>
  26.  
  27. #include <exec/memory.h>
  28. #include <workbench/workbench.h>
  29. #include <workbench/startup.h>
  30. #include <libraries/mui.h>
  31. #include <libraries/asl.h>
  32. #include <libraries/gadtools.h>
  33. #include <libraries/iffparse.h>
  34. #include <libraries/openurl.h>
  35.  
  36. #include <mui/NListview_mcc.h>
  37. #include <mui/NList_mcc.h>
  38. #include <mui/Popport_mcc.h>
  39. #include <mui/Popplaceholder_mcc.h>
  40.  
  41. #include <string.h>
  42. #include <ctype.h>
  43.  
  44. /**************************************************************************/
  45.  
  46. #define REG(x) register __ ## x
  47. #define SAVEDS __saveds
  48. #define ASM __asm
  49. #define STDARGS __stdargs
  50.  
  51. /**************************************************************************/
  52.  
  53. extern ASM VOID *AsmCreatePool (REG(d0) ULONG, REG(d1) ULONG, REG(d2) ULONG, REG(a6) struct ExecBase *);
  54. extern ASM VOID  AsmDeletePool (REG(a0) APTR,  REG(a6) struct ExecBase *);
  55. extern ASM VOID *AsmAllocPooled(REG(a0) APTR,  REG(d0) ULONG, REG(a6) struct ExecBase *);
  56. extern ASM VOID  AsmFreePooled (REG(a0) APTR,  REG(a1) APTR,  REG(d0) ULONG, REG(a6) struct ExecBase *);
  57.  
  58. /**************************************************************************/
  59.  
  60. #define APPNAME      "OpenURL"
  61. #define APPBASENAME  "OPENURL"
  62. #define APPVER       "3"
  63. #define APPREV       "0"
  64. #define APPVERSTR    "$VER: " APPNAME " " APPVER "." APPREV " " __AMIGADATE__
  65. #define APPCOPYRIGHT "Placed in the public domain"
  66. #define APPAUTHOR    "Troels Walsted Hansen"
  67. #define APPEMAIL     "troels@thule.no"
  68. #define APPDESCR     "Preferences program for openurl.library"
  69.  
  70. #define PREFS_VERSION 3
  71.  
  72. /**************************************************************************/
  73.  
  74. /* mui class tricks */
  75.  
  76. #undef MUIC_String 
  77. #define MUIC_String stringclassname 
  78. #undef MUIC_Listview
  79. #define MUIC_Listview listviewclassname 
  80. #undef MUIC_List
  81. #define MUIC_List listclassname 
  82.  
  83. /**************************************************************************/
  84.  
  85. #define myPopButton(image)\
  86.     ImageObject,\
  87.         ImageButtonFrame,\
  88.         MUIA_InputMode,            MUIV_InputMode_RelVerify,\
  89.         MUIA_Background,           MUII_ButtonBack,\
  90.         MUIA_CycleChain,           TRUE,\
  91.         MUIA_Image_Spec,           image,\
  92.         MUIA_Image_FontMatchWidth, TRUE,\
  93.         MUIA_Image_FreeVert,       TRUE,\
  94.         End
  95.  
  96. #define myKeyCheckMark(selected,control)\
  97.     ImageObject,\
  98.         ImageButtonFrame,\
  99.         MUIA_InputMode        , MUIV_InputMode_Toggle,\
  100.         MUIA_Image_Spec       , MUII_CheckMark,\
  101.         MUIA_Image_FreeVert   , TRUE,\
  102.         MUIA_CycleChain       , TRUE,\
  103.         MUIA_Selected         , selected,\
  104.         MUIA_Background       , MUII_ButtonBack,\
  105.         MUIA_ShowSelState     , FALSE,\
  106.         MUIA_ControlChar      , control,\
  107.         End
  108.  
  109. /**************************************************************************/
  110.  
  111. #define MUISN_TWH              328 /* put your OWN serialnumber here! */
  112. #define TAG_MUI_TWH            (TAG_USER | ( MUISN_TWH << 16))
  113. #define TAGBASE_APP            (TAG_MUI_TWH)
  114. #define TAGBASE_PREFSWIN       (TAG_MUI_TWH+50)
  115. #define TAGBASE_APPLIST        (TAG_MUI_TWH+100)
  116. #define TAGBASE_BROWSEREDITWIN (TAG_MUI_TWH+150)
  117. #define TAGBASE_MAILEREDITWIN  (TAG_MUI_TWH+200)
  118.  
  119. /**************************************************************************/
  120.  
  121. extern VOID SPrintf(STRPTR to, STRPTR fmt, ...);
  122. extern LONG xget(Object *obj, ULONG attribute);
  123. extern ULONG __stdargs DoSuperNew(struct IClass *cl, Object *obj, ULONG tag1, ...);
  124.